<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        .box{
            padding:50px;
            background: rgb(218, 181, 181);
        }
        .box2{
            width:100px;
            height: 100px;
            background: rgb(160, 116, 33);
        }
    </style>
</head>
<body>
    <div id="app">
        <div class="box" @click.self="fn1">
            <div class="box2"></div>
            <button>百度</button>
        </div>
    </div>
    <script src="./vue.js"></script>
    <script>
        let vm = new Vue({
            el:"#app",
            data:{

            },
            methods:{
                fn1(){
                    alert("我是父元素的事情");
                }
            }
        })
    </script>
</body>
</html>